home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / mui / modula / txt / muisupport.mod < prev    next >
Text File  |  1996-08-14  |  3KB  |  113 lines

  1. IMPLEMENTATION MODULE MuiSupport;
  2.  
  3. (*$ NilChk      := FALSE *)
  4. (*$ EntryClear  := FALSE *)
  5. (*$ LargeVars   := FALSE *)
  6.  
  7. (*$ DEFINE Locale:=FALSE *)
  8.  
  9. (* MuiSupport 2.0
  10. ** converted by C.Scholz
  11. **
  12. ** HISTORY :
  13. **
  14. ** 22.10.1993 : changed fail, it now does not use Terminal anymore.
  15. **              Instead it uses Arts.Requester
  16. **              (inspired by Michael Suelman)
  17. **
  18. **/// "$Log: MuiSupport.mod $
  19.  * Revision 1.3  1996/08/14  01:39:07  olf
  20.  * MUI 3.5
  21.  *
  22.  * Revision 1.2  1995/12/15  16:37:53  olf
  23.  * - applied changes from Stefan Schulz
  24.  * - cleanup of IMPORT section
  25.  *"
  26. # Revision 1.1  1995/09/25  15:32:52  olf
  27. # Initial revision
  28. #
  29. # Revision 1.6  1994/08/16  20:33:19  Kochtopf
  30. # fail bei +LOCALE berichtigt, so dass der String nicht auf 0C, sondern
  31. # auf NIL getestet wird.
  32. #
  33. # Revision 1.5  1994/08/11  17:00:11  Kochtopf
  34. # *** empty log message ***
  35. #
  36. # Revision 1.4  1994/02/09  14:50:03  Kochtopf
  37. # Versionsnummer in 2.0 geaendert.
  38. #
  39. # Revision 1.3  1994/02/02  09:37:18  Kochtopf
  40. # app bei fail in VAR-Parameter geaendert.
  41. #
  42. # Revision 1.2  1994/02/01  16:49:10  Kochtopf
  43. # kleine Veraenderungen.
  44. #
  45. **\\\
  46. **
  47. *)
  48.  
  49. FROM SYSTEM     IMPORT  ASSEMBLE, ADDRESS, ADR;
  50. FROM Arts       IMPORT  StrPtr, returnVal, Exit, Requester;
  51. FROM MuiD       IMPORT  APTR ;
  52.  
  53. IMPORT
  54.   ml : MuiL,
  55.   R ;
  56.  
  57. PROCEDURE DoMethod(obj{R.A2} : APTR; msg{R.A1} : APTR);
  58. (*$ EntryExitCode:=FALSE *)
  59.  
  60. BEGIN
  61.  
  62.     ASSEMBLE (  MOVEA.L -4(A2),  A0
  63.                 MOVE.L   8(A0),-(A7)
  64.                 RTS
  65.                 END );
  66.  
  67. END DoMethod;
  68.  
  69. PROCEDURE DOMethod(obj{R.A2} : APTR; msg{R.A1} : APTR) : LONGINT;
  70. (*$ EntryExitCode:=FALSE *)
  71.  
  72. BEGIN
  73.  
  74.     ASSEMBLE (  MOVEA.L -4(A2),  A0
  75.                 MOVE.L   8(A0),-(A7)
  76.                 RTS
  77.                 END );
  78.  
  79. END DOMethod;
  80.  
  81.  
  82.  
  83. (*****************)
  84. (* Fail Function *)
  85. (*****************)
  86.  
  87. (*$ IF Locale *)
  88. PROCEDURE fail(VAR app : APTR; str : StrPtr);
  89. (*$ ELSE *) (*$ CopyDyn := FALSE *)
  90. PROCEDURE fail(VAR app : APTR; str : ARRAY OF CHAR);
  91. (*$ ENDIF *)
  92.  
  93.     VAR
  94.         Result     : BOOLEAN;
  95.  
  96.     BEGIN
  97.         IF app#NIL THEN ml.mDisposeObject(app); app:=NIL; END;
  98.  
  99.                 (*$ IF Locale *)
  100.         IF str # NIL THEN
  101.                     Result:=Requester(ADR("MUI-Request"),str,NIL,ADR("Oh..."));
  102.                 (*$ ELSE *)
  103.         IF str[0]#0C THEN
  104.                     Result:=Requester(ADR("MUI-Request"),ADR(str),NIL,ADR("Oh..."));
  105.                 (*$ ENDIF *)
  106.                 Exit(20);
  107.            ELSE
  108.                 Exit(0);
  109.            END;
  110.     END fail;
  111.  
  112. END MuiSupport.
  113.